package com.kmproject.haifu.mvp.ui.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kmproject.haifu.R;
import com.kmproject.haifu.mvp.model.entity.beans.RentSeekingNoticeBean;

import java.util.List;

public class NoticeRentSeekingAdapter extends BaseQuickAdapter<RentSeekingNoticeBean, BaseViewHolder> {
    public NoticeRentSeekingAdapter(@Nullable List<RentSeekingNoticeBean> data) {
        super(R.layout.activity_notice_rent_seeking_tem,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RentSeekingNoticeBean item) {
        helper.setText(R.id.notice_rent_seeking_tem_time,item.getFormatCreateTime());
        helper.setText(R.id.notice_rent_seeking_tem_title,item.getSeekingTypeName()+
                " | "+item.getRoomCountName()+item.getDrawingCountName()+item.getToiletCountName());
        helper.setText(R.id.notice_rent_seeking_tem_price,item.getLowestRentBudget()+"-"+item.getHighestRentBudget()+"P/"+(item.getEstimateRentingUnit().equals("day")
        ?"天":(item.getEstimateRentingUnit().equals("year")?"年":"月")));
   helper.setText(R.id.notice_rent_seeking_tem_detail,item.getDetail());


    }
}
